<?php

	require_once APPPATH . 'controllers/base_controllers/base_controller.php';
	
	class walk_home extends Base_controller
	{
		public function __construct()
		{
			parent::__construct();
		}
		
		
		public function index()
		{
			$this->load->model('proxies/Metric_proxy');
			$this->load->model('proxies/Walk_proxy');
			
			$data['title'] = 'Walk/Run for CORD '.$this->Walk_proxy->getCurrentYear();
			$data['view'] = 'walk/home/walk_home_view';
			$data['goal'] = $this->Metric_proxy->getGoal();
			$data['raised'] = $this->Metric_proxy->getTotalRaised();
			$data['registered'] = $this->Metric_proxy->getNumberRegistered();
			$data['totalparticipants'] = $this->Metric_proxy->getNumberParticipating();
			
			$this->load->view( 'templates/registration/registration_template', $data );
		}
		
		
		public function participant_scroller()
		{
			$this->load->model('proxies/Walk_proxy');
			
			/* $participants = array();
			array_push($participants, "John Doe");
			array_push($participants, "Jane Doe");
			array_push($participants, "Bob Doe");
			array_push($participants, "Steve Doe");
			array_push($participants, "Stacey Doe");
			array_push($participants, "Mike Doe");
			array_push($participants, "Kate Doe");
			array_push($participants, "Marry Doe");
			array_push($participants, "Sean Doe"); */
			
			// $data["participants"] = $participants;
			$data['participants'] = $this->Walk_proxy->getTopFundraiserList();
			
			$this->load->view( 'walk/home/participant_scroller_view', $data );
		}
	}

?>